function check(id) {

    var data = getLocData("blocks");
    logJson(data)
    if (data.indexOf(id) > -1){
        log("true")
    }else {
        log("false")
    }
}

function CanIUse(id) {
    var data = getLocData("blocks");
    logJson(data)
    if (data.indexOf(id) > -1){
        return true
    }else {
        return false
    }
}


function RoleAdmin() {
    var need = "ROLE_ADMIN_MANAGER"
    var data = getLocData("roles");
    if (data.indexOf(need) > -1) {
        return true;
    }else {
        return false;
    }
    // return data.indexOf(need) > -1 ? true : false;
}
function RoleWenYuan() {
    var need = "ROLE_ADMIN_WY"
    var data = getLocData("roles");
    if (data.indexOf(need) > -1) {
        return true;
    }else {
        return false;
    }
}

function RoleFangLan() {
    var need = "ROLE_ADMIN_FLDZ"
    var data = getLocData("roles");
    if (data.indexOf(need) > -1) {
        return true;
    }else {
        return false;
    }
}
function RoleRongJie() {
    var need = "ROLE_ADMIN_RJDZ"
    var data = getLocData("roles");
    if (data.indexOf(need) > -1) {
        return true;
    }else {
        return false;
    }
}
function RoleZiGuan() {
    var need = "ROLE_ADMIN_ZYGL"
    var data = getLocData("roles");
    if (data.indexOf(need) > -1) {
        return true;
    }else {
        return false;
    }
}
function RoleJingLi() {
    var need = "ROLE_ADMIN_JL"
    var data = getLocData("roles");
    if (data.indexOf(need) > -1) {
        return true;
    }else {
        return false;
    }
}